package com.itheima.mapper;

import org.apache.ibatis.annotations.*;
import com.itheima.pojo.Dept;

import java.util.List;

@Mapper
public interface DeptMapper {

    @Select("select * from tlias.dept")
    List<Dept> list();
    @Delete("delete from tlias.dept where id=#{id}")
    void deleteById(Integer id);
    @Insert("insert into tlias.dept(name,tlias.dept.create_time,tlias.dept.update_time) values (#{name},#{createTime},#{updateTime})")
    void insert(Dept dept1);
    @Select("select * from tlias.dept where id=#{id}")
    List<Dept> SelectList(Integer id);
    @Update("update dept set name=#{name},update_time=#{updateTime} where id=#{id}")
    void updateInfo(Dept dept2);
}
